package domfarr.tapestry.pages;

import java.util.Date;
import java.util.List;

import org.apache.tapestry5.ioc.annotations.Inject;

import domfarr.tapestry.data.DataSource;
import domfarr.tapestry.model.Celebrity;

/**
 * Start page of application celebrity-collector.
 */
public class Index {
	@Inject
	private DataSource dataSource;

	public DataSource getDataSource() {
		return dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public Date getCurrentTime() {
		return dataSource.getCurrentTime();
	}
	
	public List<Celebrity> getAllCelebrities() {
		return dataSource.getAllCelebrities();
	}
}
